* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}
html, body {
    background: #f8f9fa;
    color: #333;
    width: 100%;
    overflow-x: hidden;
}
a {
    text-decoration: none;
    color: inherit;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 头部 */
header {
    background: #1E3A8A;
    color: white;
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon {
    font-size: 2rem;
    color: #FF7D00;
}
.logo-text h1 {
    font-size: 1.4rem;
}
.logo-text p {
    font-size: 0.8rem;
    opacity: 0.8;
}
.login-btn {
    background: #FF7D00;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
}

/* 主体 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 3%;
}

/* 广告 */
.ad-banners {
    margin-bottom: 1.5rem;
}
.ad-banner {
    background: white;
    padding: 6px;
    border-radius: 6px;
    margin-bottom: 0.8rem;
}
.ad-img {
    width: 100%;
    border-radius: 4px;
}
.text-ad-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}
.text-ad-item {
    padding: 0.8rem;
    text-align: center;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}
.ad-color-1 { background: #FF7D00; }
.ad-color-2 { background: #3B82F6; }
.ad-color-3 { background: #10B981; }
.ad-color-4 { background: #8B5CF6; }
.ad-color-5 { background: #EF4444; }

/* 课程区域 */
.advanced-student {
    margin: 2rem 0;
}
.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}
.section-title h2 {
    font-size: 1.4rem;
    color: #1E3A8A;
    display: inline-block;
    position: relative;
}
.section-title h2::after {
    content: '';
    width: 60px;
    height: 3px;
    background: #FF7D00;
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* 课程列表 */
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}
.course-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 图片 */
.course-img-wrapper {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding: 12px !important;
}
.course-img {
    width: 100% !important;
    height: auto !important;
    object-fit: unset !important;
    display: block !important;
    border-radius: 6px !important;
}

.course-info {
    padding: 1rem;
    padding-top: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.course-info h3 {
    font-size: 1rem;
    color: #1E3A8A;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8em;
}

.course-info .tag {
    background: #EFF6FF;
    color: #3B82F6;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 0.6rem;
}
.course-info p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.course-meta {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.6rem;
    margin-top: auto;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}
.pagination-btn {
    background: #1E3A8A;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
}
.pagination-btn:disabled {
    background: #ccc;
}
.pagination-info {
    font-size: 0.9rem;
    color: #666;
}
.view-all-link {
    background: #1E3A8A;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin: 0 auto;
}

/* 底部 */
footer {
    background: #1E3A8A;
    color: white;
    padding: 2rem 5% 1rem;
    margin-top: 3rem;
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}
.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    position: relative;
}
.footer-col h3::after {
    content: '';
    width: 40px;
    height: 3px;
    background: #FF7D00;
    position: absolute;
    bottom: 0;
    left: 0;
}
.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.85;
}
.wechat-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding: 0.6rem;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}
.wechat-info i {
    color: #FF7D00;
    font-size: 1.2rem;
}
.wechat-number {
    font-weight: 600;
}
.qrcode-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.qrcode-item {
    width: 90px;
    text-align: center;
}
.qrcode {
    background: white;
    padding: 6px;
    border-radius: 8px;
}
.qrcode-desc {
    font-size: 0.8rem;
    margin-top: 0.4rem;
}
.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 1.5rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    .text-ad-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .course-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
    }
    .qrcode-group {
        flex-wrap: wrap;
        justify-content: center;
    }
}
@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.2rem;
    }
    .section-title h2 {
        font-size: 1.2rem;
    }
}